DISCUSSION
The
ATSUGetAllLayoutControls function obtains an array of the tags and data sizes corresponding to all previously set text layout attribute values for an entire text layout object. You can obtain a particular attribute value by passing the corresponding tag and data size pair to the function
ATSUGetLayoutControl. To obtain the tags and data sizes corresponding to all previously set text layout attribute values in a line of a text layout object, call the function
ATSUGetAllLineControls.
The best way to use
ATSUGetAllLayoutControls is to call it twice:
-
Pass a reference to the text layout object containing the attribute in the iTextLayout parameter, NULL for the oAttributeInfoArray parameter, and 0 for the other parameters. ATSUGetAllLayoutControls returns the size of the oAttributeInfoArray array in the oTagValuePairCount parameter.
-
Allocate enough space for an array of the returned size, then call the function again, passing a pointer in the oAttributeInfoArray parameter; on return, the pointer references the oAttributeInfoArray array.